<template>
  <div class="about">
    <h1 v-for="area in areaList" :key="area.id">{{ area.name }}</h1>
  </div>
</template>
<script>

    import area from '../api/area'

    export default {
        data() {
            return {
                areaList:[]    
            }
        },
        methods: {
            fetchData(){
                area.getList().then(response=>{
                    if(response.data.code === 200){
                        this.areaList = response.data.data
                    }
                }).catch(error=>{
                    console.log(error)
                })
            }
        },
        created() {
            this.fetchData()
        },
    }
</script>

<style scoped>
</style>
